package com.internetCafes.spms.web.sys.controller;

import com.internetCafes.spms.common.utils.entity.RR;
import com.internetCafes.spms.web.sys.model.SystemInfoRes;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 系统相关内容 前端控制器
 *
 * @author llz
 */
@RestController
public class SysController {

    @Value("${system.info.version}")
    private String version;

    /**
     * 系统信息获取
     */
    @GetMapping("/sys/info")
    public RR<SystemInfoRes> getSystemInfo() {
        SystemInfoRes systemInfoRes = new SystemInfoRes();
        systemInfoRes.setVersion(version);
        return RR.success(systemInfoRes);
    }
}
